package com.imooc.project.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 出售订单,每种类型只能有一种在进行中
 * </p>
 *
 * @author jobob
 * @since 2021-07-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TSale对象", description="出售订单,每种类型只能有一种在进行中")
public class TSale implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户编号")
    private String userId;

    @ApiModelProperty(value = "用户账号")
    private String userName;

    @ApiModelProperty(value = "用户姓名实名")
    private String realName;

    @ApiModelProperty(value = "状态: 0待发布(支付中), 1已发布  2 已结束")
    private Integer state;

    @ApiModelProperty(value = " 虚拟币类型  1 威点   2 星豆")
    private Integer coinType;

    @ApiModelProperty(value = "出售价格")
    private BigDecimal salePrice;

    @ApiModelProperty(value = "出售数量")
    private Integer saleCount;

    @ApiModelProperty(value = "剩余数量")
    private Integer leftCount;

    @ApiModelProperty(value = "取消时间")
    private LocalDateTime cancelTime;

    @ApiModelProperty(value = "兑换比例 虚拟币兑换成的比例1小时 360:1")
    private Integer rechargeRate;

    @ApiModelProperty(value = "发布时间")
    private LocalDateTime publishTime;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人")
    private String createUser;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "更新人")
    private String updateUser;

    @ApiModelProperty(value = "成交完成时间")
    private LocalDateTime matchTime;

    @ApiModelProperty(value = "成交时长")
    private Integer tradeCount;

    @ApiModelProperty(value = "订单金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "成交金额")
    private BigDecimal tradeAmount;

    @ApiModelProperty(value = "出售-虚拟币数量")
    private BigDecimal saleCoin;

    @ApiModelProperty(value = "成交-虚拟币数量")
    private BigDecimal tradeCoin;

    @ApiModelProperty(value = "退还虚拟币")
    private BigDecimal refundCoin;

    @ApiModelProperty(value = "0未支付 2已支付,3支付失败")
    private Integer payStatus;

    @ApiModelProperty(value = "支付流水号")
    private String tradeNo;

    @ApiModelProperty(value = "订单编号未用到")
    private String orderNo;


}
